package com.mayi.zds.dao;

import com.mayi.zds.entity.Judge;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author 刘宇涛
 * @Date 2019/12/25
 */
@Repository
public interface JudgeDAO {
    /**
     * @Author 刘宇涛
     * @Description  根据商品id查对应评价（存入商品实体类）
     * @Date 14:27 2019/12/25
     * @Param [goodsId] 商品id
     * @return java.util.List<com.mayi.zds.entity.Judge>    评价实体类集合（存入对应商品实体类）
     **/
    @Select("select * from zds_judge where item_id=#{goodsId}")
    public List<Judge> getByGoodsId(String goodsId);

    @Delete("delete form zds_judge where item_id=#{goodsId}")
    /**
     * @description: 删除该商品的评价
     * @params: [goodsId]
     * @return: void
     * @author: 胡飞
     * @time: 2019/12/27 15:21
     */
    public void delete(String goodsId);


}
